/**
 * Software License, Version 1.0
 * 
 * Copyright 2003 The Trustees of Indiana University.  All rights reserved.
 * 
 *
 *Redistribution and use in source and binary forms, with or without 
 *modification, are permitted provided that the following conditions are met:
 *
 *1) All redistributions of source code must retain the above copyright notice,
 * the list of authors in the original source code, this list of conditions and
 * the disclaimer listed in this license;
 *2) All redistributions in binary form must reproduce the above copyright 
 * notice, this list of conditions and the disclaimer listed in this license in
 * the documentation and/or other materials provided with the distribution;
 *3) Any documentation included with all redistributions must include the 
 * following acknowledgement:
 *
 *"This product includes software developed by the Community Grids Lab. For 
 * further information contact the Community Grids Lab at 
 * http://communitygrids.iu.edu/."
 *
 * Alternatively, this acknowledgement may appear in the software itself, and 
 * wherever such third-party acknowledgments normally appear.
 * 
 *4) The name Indiana University or Community Grids Lab or NaradaBrokering, 
 * shall not be used to endorse or promote products derived from this software 
 * without prior written permission from Indiana University.  For written 
 * permission, please contact the Advanced Research and Technology Institute 
 * ("ARTI") at 351 West 10th Street, Indianapolis, Indiana 46202.
 *5) Products derived from this software may not be called NaradaBrokering, 
 * nor may Indiana University or Community Grids Lab or NaradaBrokering appear
 * in their name, without prior written permission of ARTI.
 * 
 *
 * Indiana University provides no reassurances that the source code provided 
 * does not infringe the patent or any other intellectual property rights of 
 * any other entity.  Indiana University disclaims any liability to any 
 * recipient for claims brought by any other entity based on infringement of 
 * intellectual property rights or otherwise.  
 *
 *LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO 
 *WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES
 *NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF 
 *INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. 
 *INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", 
 *"VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE.  
 *LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR 
 *ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION 
 *GENERATED USING SOFTWARE.
 */
package cgl.narada.protocol;

/**
 * This class maintains the protocol constants contained with the cgl.narada
 * protocol suite.
 * @author Shrideep Pallickara
 * $Revision$
 * $Date$
 *   
 */
public interface Protocol {
  static final byte CONN_SETUP                     = (byte) 0;
  static final byte CONN_REQ                       = (byte) 1;
  static final byte CONN_SUCC                      = (byte) 2;
  static final byte CONN_ALREADY                   = (byte) 3;
  
  static final byte ACK                            = (byte) 4;
  static final byte NAK                            = (byte) 5;
  
  static final byte DATA                           = (byte) 6;
  
  static final byte GPP_SETUP_REQUEST              = (byte) 7;
  static final byte GPP_SETUP_RESPONSE             = (byte) 8;
  static final byte GPP_INFO                       = (byte) 9;
  
  static final byte NAP_SETUP_REQUEST              = (byte) 10;
  static final byte NAP_SETUP_RESPONSE             = (byte) 11;
  static final byte NAP_ADDRESS_REQUEST            = (byte) 12; 
  static final byte NAP_ADDRESS_RESPONSE           = (byte) 13; 
  
  static final byte CONNECTION_ADDED               = (byte) 14;
  static final byte CONNECTION_LOST                = (byte) 15; 
  static final byte CONNECTION_BUFFER              = (byte) 16;
  
  static final byte PPP_ADD_PREDICATE              = (byte) 17;
  static final byte PPP_REMOVE_PREDICATE           = (byte) 18;
  static final byte PPP_PREDICATE_BUFFER           = (byte) 19;
  
  static final byte EVENT                          = (byte) 20;
  static final byte PERSISTENT_EVENT               = (byte) 21;
  static final byte CLIENT_EVENT                   = (byte) 22;
  static final byte CLIENT_PERSISTENT_EVENT        = (byte) 23;
  
  static final byte PROFILES_EXCHANGE               = (byte) 24;
  
  static final byte NAP_CLIENT_ADD                 = (byte) 30;
  static final byte NAP_CLIENT_REMOVE              = (byte) 31;
  static final byte NAP_CLIENT_ADD_RESPONSE        = (byte) 32;
  static final byte NAP_CLIENT_REMOVE_RESPONSE     = (byte) 33;

  static final byte PPP_CLIENT_ADD_PREDICATE       = (byte) 34;
  static final byte PPP_CLIENT_REMOVE_PREDICATE    = (byte) 35;
  static final byte PPP_CLIENT_PREDICATE_BUFFER    = (byte) 36;
   
  static final byte JMS_CLIENT_ADD_PREDICATE       = (byte) 41;
  static final byte JMS_CLIENT_REMOVE_PREDICATE    = (byte) 42;
  static final byte JMS_ADD_PREDICATE              = (byte) 43;
  static final byte JMS_REMOVE_PREDICATE           = (byte) 44;

  
  

  static final byte RECOVERY_EVENT                 = (byte) 47;
  static final byte CLIENT_RECOVERY                = (byte) 48;
  static final byte UNIT_RECOVERY                  = (byte) 49;
  
  static final byte STORAGE_INFO                   = (byte) 50;
 
  static final byte TCP                            = (byte) 52;
  static final byte UDP                            = (byte) 53;
  static final byte MULTICAST                      = (byte) 54; 
  static final byte HTTP                           = (byte) 55;


  static final int  UNIT_PARTITION                 = (byte) 56;
  static final int  SYSTEM_PARTITION               = (byte) 57;
  
  static final byte JMS_CLIENT_EVENT               = (byte) 58;
  static final byte JMS_EVENT                      = (byte) 59;
  
  /** The request for a connection initiated by the client in Distributed
      JMS */
  static final byte DJMS_CLIENT2BL_CONN_REQUEST    = (byte) 60;
  
  /** The connection request being forwarded to the broker located by the
      locator service */
  static final byte DJMS_BL2BROKER_CONN_REQUEST    = (byte) 61;
  
  /** Once the conn request has been forwarded to a broker, the broker
      responds with info pertaining to the conn request */
  static final byte DJMS_BROKER2BL_CONN_RESPONSE   = (byte) 62;
  
  /** Information pertaining to located valid broker being forwarded to the
      client. This is also useful for security purposes. */
  static final byte DJMS_BL2CLIENT_CONN_RESPONSE   = (byte) 63;
  
  /** The final step in the initialization sequence where the BL initiates
      a connection */
  static final byte DJMS_BROKER2CLIENT_CONN_RESPONSE=(byte) 64;
  
  /** This is used by the brokers to update information pertaining to the
      increase or decrease of concurrent connections being mainatained by
      a broker */
  static final byte DJMS_BROKER2BL_CONNINFO_UPDATE = (byte) 65;
  
  static final byte DJMS_BROKER2BL_BROKER_ADDED    = (byte) 66;

  static final byte DJMS_BROKER2BL_BROKER_REMOVED  = (byte) 67;
  
  static final byte PERFORMANCE_MEASUREMENT        = (byte) 68;
  static final byte PERFORMANCE_MEASUREMENT_INITIATE  = (byte) 69;

  static final byte PING                           = (byte) 70;
  static final byte PING_REPLY                     = (byte) 71;

  static final byte JMS_CLIENT_ADD_PROFILE         = (byte) 72;
  static final byte JMS_CLIENT_REMOVE_PROFILE      = (byte) 73;
  static final byte JMS_ADD_PROFILE                = (byte) 74;
  static final byte JMS_REMOVE_PROFILE             = (byte) 75;

  static final byte NARADA_JXTA_EVENT              = (byte) 80;
  static final byte NARADA_JXTA_EVENT_BROKER       = (byte) 81;

  static final byte NARADA_RTP_EVENT               = (byte) 84;
  static final byte NARADA_RTP_CLIENT_EVENT        = (byte) 85;
  static final byte RTP_CLIENT_ADD_PROFILE         = (byte) 86;
  static final byte RTP_CLIENT_REMOVE_PROFILE      = (byte) 87;
  static final byte RTP_ADD_PROFILE                = (byte) 88;
  static final byte RTP_REMOVE_PROFILE             = (byte) 89;

  static final byte XPATH_CLIENT_ADD_PROFILE         = (byte) 90;
  static final byte XPATH_CLIENT_REMOVE_PROFILE      = (byte) 91;
  static final byte XPATH_ADD_PROFILE                = (byte) 92;
  static final byte XPATH_REMOVE_PROFILE             = (byte) 93;

  static final byte NARADA_XML_EVENT               = (byte) 94;
  static final byte NARADA_XML_CLIENT_EVENT        = (byte) 95;

  static final byte SECURE_INTERACTIONS            = (byte) 96;


  static final byte PROFILE_PROPAGATION            = (byte) 97;
  static final byte NB_EVENT                       = (byte) 98;
  static final byte NODE_ADDRESS                   = (byte) 99;
  static final byte CLIENT_SETUP                   = (byte) 100;
  static final byte CLIENT_SETUP_SUCCESS           = (byte) 101;
  
  static final byte LONG_TOPIC_EVENT               = (byte) 102;

  static final byte DISCOVERY_REQUEST              = (byte) 103;
  
  //HG: For client setup failure
  static final byte CLIENT_SETUP_FAILURE           = (byte) 104;  
  
  // HG: For P2P setup via relay server
  static final byte REGISTER_PEER                  = (byte) 111;
  static final byte REGISTER_PEER_RESPONSE         = (byte) 112;
  static final byte P2P_CONN_REQUEST               = (byte) 113;
  static final byte P2P_CONN_RESPONSE              = (byte) 114; 
}







